package qldc.pm.qlktcsdldc.service.base;

import com.liferay.portal.kernel.bean.BeanReference;
import com.liferay.portal.kernel.bean.IdentifiableBean;
import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
import com.liferay.portal.kernel.dao.orm.Projection;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.search.Indexable;
import com.liferay.portal.kernel.search.IndexableType;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.model.PersistedModel;
import com.liferay.portal.service.BaseLocalServiceImpl;
import com.liferay.portal.service.PersistedModelLocalServiceRegistryUtil;
import com.liferay.portal.service.persistence.UserPersistence;

import qldc.pm.qlktcsdldc.model.LichSuCongDan;
import qldc.pm.qlktcsdldc.service.LichSuCongDanLocalService;
import qldc.pm.qlktcsdldc.service.persistence.DanhMucSoBanNganhFinder;
import qldc.pm.qlktcsdldc.service.persistence.DanhMucSoBanNganhPersistence;
import qldc.pm.qlktcsdldc.service.persistence.DanhMucSoBanNganh_TruongCongDanPersistence;
import qldc.pm.qlktcsdldc.service.persistence.LichSuCongDanFinder;
import qldc.pm.qlktcsdldc.service.persistence.LichSuCongDanPersistence;
import qldc.pm.qlktcsdldc.service.persistence.NguoiDungFinder;
import qldc.pm.qlktcsdldc.service.persistence.NguoiDungPersistence;
import qldc.pm.qlktcsdldc.service.persistence.TruongCongDanPersistence;

import java.io.Serializable;

import java.util.List;

import javax.sql.DataSource;

/**
 * Provides the base implementation for the lich su cong dan local service.
 *
 * <p>
 * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link qldc.pm.qlktcsdldc.service.impl.LichSuCongDanLocalServiceImpl}.
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see qldc.pm.qlktcsdldc.service.impl.LichSuCongDanLocalServiceImpl
 * @see qldc.pm.qlktcsdldc.service.LichSuCongDanLocalServiceUtil
 * @generated
 */
public abstract class LichSuCongDanLocalServiceBaseImpl
    extends BaseLocalServiceImpl implements LichSuCongDanLocalService,
        IdentifiableBean {
    @BeanReference(type = qldc.pm.qlktcsdldc.service.DanhMucSoBanNganhLocalService.class)
    protected qldc.pm.qlktcsdldc.service.DanhMucSoBanNganhLocalService danhMucSoBanNganhLocalService;
    @BeanReference(type = DanhMucSoBanNganhPersistence.class)
    protected DanhMucSoBanNganhPersistence danhMucSoBanNganhPersistence;
    @BeanReference(type = DanhMucSoBanNganhFinder.class)
    protected DanhMucSoBanNganhFinder danhMucSoBanNganhFinder;
    @BeanReference(type = qldc.pm.qlktcsdldc.service.DanhMucSoBanNganh_TruongCongDanLocalService.class)
    protected qldc.pm.qlktcsdldc.service.DanhMucSoBanNganh_TruongCongDanLocalService danhMucSoBanNganh_TruongCongDanLocalService;
    @BeanReference(type = DanhMucSoBanNganh_TruongCongDanPersistence.class)
    protected DanhMucSoBanNganh_TruongCongDanPersistence danhMucSoBanNganh_TruongCongDanPersistence;
    @BeanReference(type = qldc.pm.qlktcsdldc.service.LichSuCongDanLocalService.class)
    protected qldc.pm.qlktcsdldc.service.LichSuCongDanLocalService lichSuCongDanLocalService;
    @BeanReference(type = LichSuCongDanPersistence.class)
    protected LichSuCongDanPersistence lichSuCongDanPersistence;
    @BeanReference(type = LichSuCongDanFinder.class)
    protected LichSuCongDanFinder lichSuCongDanFinder;
    @BeanReference(type = qldc.pm.qlktcsdldc.service.NguoiDungLocalService.class)
    protected qldc.pm.qlktcsdldc.service.NguoiDungLocalService nguoiDungLocalService;
    @BeanReference(type = NguoiDungPersistence.class)
    protected NguoiDungPersistence nguoiDungPersistence;
    @BeanReference(type = NguoiDungFinder.class)
    protected NguoiDungFinder nguoiDungFinder;
    @BeanReference(type = qldc.pm.qlktcsdldc.service.TruongCongDanLocalService.class)
    protected qldc.pm.qlktcsdldc.service.TruongCongDanLocalService truongCongDanLocalService;
    @BeanReference(type = TruongCongDanPersistence.class)
    protected TruongCongDanPersistence truongCongDanPersistence;
    @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
    protected com.liferay.counter.service.CounterLocalService counterLocalService;
    @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
    protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
    @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
    protected com.liferay.portal.service.UserLocalService userLocalService;
    @BeanReference(type = com.liferay.portal.service.UserService.class)
    protected com.liferay.portal.service.UserService userService;
    @BeanReference(type = UserPersistence.class)
    protected UserPersistence userPersistence;
    private String _beanIdentifier;
    private ClassLoader _classLoader;
    private LichSuCongDanLocalServiceClpInvoker _clpInvoker = new LichSuCongDanLocalServiceClpInvoker();

    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. Always use {@link qldc.pm.qlktcsdldc.service.LichSuCongDanLocalServiceUtil} to access the lich su cong dan local service.
     */

    /**
     * Adds the lich su cong dan to the database. Also notifies the appropriate model listeners.
     *
     * @param lichSuCongDan the lich su cong dan
     * @return the lich su cong dan that was added
     * @throws SystemException if a system exception occurred
     */
    @Indexable(type = IndexableType.REINDEX)
    @Override
    public LichSuCongDan addLichSuCongDan(LichSuCongDan lichSuCongDan)
        throws SystemException {
        lichSuCongDan.setNew(true);

        return lichSuCongDanPersistence.update(lichSuCongDan);
    }

    /**
     * Creates a new lich su cong dan with the primary key. Does not add the lich su cong dan to the database.
     *
     * @param LichSuCongDanId the primary key for the new lich su cong dan
     * @return the new lich su cong dan
     */
    @Override
    public LichSuCongDan createLichSuCongDan(long LichSuCongDanId) {
        return lichSuCongDanPersistence.create(LichSuCongDanId);
    }

    /**
     * Deletes the lich su cong dan with the primary key from the database. Also notifies the appropriate model listeners.
     *
     * @param LichSuCongDanId the primary key of the lich su cong dan
     * @return the lich su cong dan that was removed
     * @throws PortalException if a lich su cong dan with the primary key could not be found
     * @throws SystemException if a system exception occurred
     */
    @Indexable(type = IndexableType.DELETE)
    @Override
    public LichSuCongDan deleteLichSuCongDan(long LichSuCongDanId)
        throws PortalException, SystemException {
        return lichSuCongDanPersistence.remove(LichSuCongDanId);
    }

    /**
     * Deletes the lich su cong dan from the database. Also notifies the appropriate model listeners.
     *
     * @param lichSuCongDan the lich su cong dan
     * @return the lich su cong dan that was removed
     * @throws SystemException if a system exception occurred
     */
    @Indexable(type = IndexableType.DELETE)
    @Override
    public LichSuCongDan deleteLichSuCongDan(LichSuCongDan lichSuCongDan)
        throws SystemException {
        return lichSuCongDanPersistence.remove(lichSuCongDan);
    }

    @Override
    public DynamicQuery dynamicQuery() {
        Class<?> clazz = getClass();

        return DynamicQueryFactoryUtil.forClass(LichSuCongDan.class,
            clazz.getClassLoader());
    }

    /**
     * Performs a dynamic query on the database and returns the matching rows.
     *
     * @param dynamicQuery the dynamic query
     * @return the matching rows
     * @throws SystemException if a system exception occurred
     */
    @Override
    @SuppressWarnings("rawtypes")
    public List dynamicQuery(DynamicQuery dynamicQuery)
        throws SystemException {
        return lichSuCongDanPersistence.findWithDynamicQuery(dynamicQuery);
    }

    /**
     * Performs a dynamic query on the database and returns a range of the matching rows.
     *
     * <p>
     * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.qlktcsdldc.model.impl.LichSuCongDanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
     * </p>
     *
     * @param dynamicQuery the dynamic query
     * @param start the lower bound of the range of model instances
     * @param end the upper bound of the range of model instances (not inclusive)
     * @return the range of matching rows
     * @throws SystemException if a system exception occurred
     */
    @Override
    @SuppressWarnings("rawtypes")
    public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
        throws SystemException {
        return lichSuCongDanPersistence.findWithDynamicQuery(dynamicQuery,
            start, end);
    }

    /**
     * Performs a dynamic query on the database and returns an ordered range of the matching rows.
     *
     * <p>
     * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.qlktcsdldc.model.impl.LichSuCongDanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
     * </p>
     *
     * @param dynamicQuery the dynamic query
     * @param start the lower bound of the range of model instances
     * @param end the upper bound of the range of model instances (not inclusive)
     * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
     * @return the ordered range of matching rows
     * @throws SystemException if a system exception occurred
     */
    @Override
    @SuppressWarnings("rawtypes")
    public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
        OrderByComparator orderByComparator) throws SystemException {
        return lichSuCongDanPersistence.findWithDynamicQuery(dynamicQuery,
            start, end, orderByComparator);
    }

    /**
     * Returns the number of rows that match the dynamic query.
     *
     * @param dynamicQuery the dynamic query
     * @return the number of rows that match the dynamic query
     * @throws SystemException if a system exception occurred
     */
    @Override
    public long dynamicQueryCount(DynamicQuery dynamicQuery)
        throws SystemException {
        return lichSuCongDanPersistence.countWithDynamicQuery(dynamicQuery);
    }

    /**
     * Returns the number of rows that match the dynamic query.
     *
     * @param dynamicQuery the dynamic query
     * @param projection the projection to apply to the query
     * @return the number of rows that match the dynamic query
     * @throws SystemException if a system exception occurred
     */
    @Override
    public long dynamicQueryCount(DynamicQuery dynamicQuery,
        Projection projection) throws SystemException {
        return lichSuCongDanPersistence.countWithDynamicQuery(dynamicQuery,
            projection);
    }

    @Override
    public LichSuCongDan fetchLichSuCongDan(long LichSuCongDanId)
        throws SystemException {
        return lichSuCongDanPersistence.fetchByPrimaryKey(LichSuCongDanId);
    }

    /**
     * Returns the lich su cong dan with the primary key.
     *
     * @param LichSuCongDanId the primary key of the lich su cong dan
     * @return the lich su cong dan
     * @throws PortalException if a lich su cong dan with the primary key could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public LichSuCongDan getLichSuCongDan(long LichSuCongDanId)
        throws PortalException, SystemException {
        return lichSuCongDanPersistence.findByPrimaryKey(LichSuCongDanId);
    }

    @Override
    public PersistedModel getPersistedModel(Serializable primaryKeyObj)
        throws PortalException, SystemException {
        return lichSuCongDanPersistence.findByPrimaryKey(primaryKeyObj);
    }

    /**
     * Returns a range of all the lich su cong dans.
     *
     * <p>
     * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.qlktcsdldc.model.impl.LichSuCongDanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
     * </p>
     *
     * @param start the lower bound of the range of lich su cong dans
     * @param end the upper bound of the range of lich su cong dans (not inclusive)
     * @return the range of lich su cong dans
     * @throws SystemException if a system exception occurred
     */
    @Override
    public List<LichSuCongDan> getLichSuCongDans(int start, int end)
        throws SystemException {
        return lichSuCongDanPersistence.findAll(start, end);
    }

    /**
     * Returns the number of lich su cong dans.
     *
     * @return the number of lich su cong dans
     * @throws SystemException if a system exception occurred
     */
    @Override
    public int getLichSuCongDansCount() throws SystemException {
        return lichSuCongDanPersistence.countAll();
    }

    /**
     * Updates the lich su cong dan in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
     *
     * @param lichSuCongDan the lich su cong dan
     * @return the lich su cong dan that was updated
     * @throws SystemException if a system exception occurred
     */
    @Indexable(type = IndexableType.REINDEX)
    @Override
    public LichSuCongDan updateLichSuCongDan(LichSuCongDan lichSuCongDan)
        throws SystemException {
        return lichSuCongDanPersistence.update(lichSuCongDan);
    }

    /**
     * Returns the danh muc so ban nganh local service.
     *
     * @return the danh muc so ban nganh local service
     */
    public qldc.pm.qlktcsdldc.service.DanhMucSoBanNganhLocalService getDanhMucSoBanNganhLocalService() {
        return danhMucSoBanNganhLocalService;
    }

    /**
     * Sets the danh muc so ban nganh local service.
     *
     * @param danhMucSoBanNganhLocalService the danh muc so ban nganh local service
     */
    public void setDanhMucSoBanNganhLocalService(
        qldc.pm.qlktcsdldc.service.DanhMucSoBanNganhLocalService danhMucSoBanNganhLocalService) {
        this.danhMucSoBanNganhLocalService = danhMucSoBanNganhLocalService;
    }

    /**
     * Returns the danh muc so ban nganh persistence.
     *
     * @return the danh muc so ban nganh persistence
     */
    public DanhMucSoBanNganhPersistence getDanhMucSoBanNganhPersistence() {
        return danhMucSoBanNganhPersistence;
    }

    /**
     * Sets the danh muc so ban nganh persistence.
     *
     * @param danhMucSoBanNganhPersistence the danh muc so ban nganh persistence
     */
    public void setDanhMucSoBanNganhPersistence(
        DanhMucSoBanNganhPersistence danhMucSoBanNganhPersistence) {
        this.danhMucSoBanNganhPersistence = danhMucSoBanNganhPersistence;
    }

    /**
     * Returns the danh muc so ban nganh finder.
     *
     * @return the danh muc so ban nganh finder
     */
    public DanhMucSoBanNganhFinder getDanhMucSoBanNganhFinder() {
        return danhMucSoBanNganhFinder;
    }

    /**
     * Sets the danh muc so ban nganh finder.
     *
     * @param danhMucSoBanNganhFinder the danh muc so ban nganh finder
     */
    public void setDanhMucSoBanNganhFinder(
        DanhMucSoBanNganhFinder danhMucSoBanNganhFinder) {
        this.danhMucSoBanNganhFinder = danhMucSoBanNganhFinder;
    }

    /**
     * Returns the danh muc so ban nganh_ truong cong dan local service.
     *
     * @return the danh muc so ban nganh_ truong cong dan local service
     */
    public qldc.pm.qlktcsdldc.service.DanhMucSoBanNganh_TruongCongDanLocalService getDanhMucSoBanNganh_TruongCongDanLocalService() {
        return danhMucSoBanNganh_TruongCongDanLocalService;
    }

    /**
     * Sets the danh muc so ban nganh_ truong cong dan local service.
     *
     * @param danhMucSoBanNganh_TruongCongDanLocalService the danh muc so ban nganh_ truong cong dan local service
     */
    public void setDanhMucSoBanNganh_TruongCongDanLocalService(
        qldc.pm.qlktcsdldc.service.DanhMucSoBanNganh_TruongCongDanLocalService danhMucSoBanNganh_TruongCongDanLocalService) {
        this.danhMucSoBanNganh_TruongCongDanLocalService = danhMucSoBanNganh_TruongCongDanLocalService;
    }

    /**
     * Returns the danh muc so ban nganh_ truong cong dan persistence.
     *
     * @return the danh muc so ban nganh_ truong cong dan persistence
     */
    public DanhMucSoBanNganh_TruongCongDanPersistence getDanhMucSoBanNganh_TruongCongDanPersistence() {
        return danhMucSoBanNganh_TruongCongDanPersistence;
    }

    /**
     * Sets the danh muc so ban nganh_ truong cong dan persistence.
     *
     * @param danhMucSoBanNganh_TruongCongDanPersistence the danh muc so ban nganh_ truong cong dan persistence
     */
    public void setDanhMucSoBanNganh_TruongCongDanPersistence(
        DanhMucSoBanNganh_TruongCongDanPersistence danhMucSoBanNganh_TruongCongDanPersistence) {
        this.danhMucSoBanNganh_TruongCongDanPersistence = danhMucSoBanNganh_TruongCongDanPersistence;
    }

    /**
     * Returns the lich su cong dan local service.
     *
     * @return the lich su cong dan local service
     */
    public qldc.pm.qlktcsdldc.service.LichSuCongDanLocalService getLichSuCongDanLocalService() {
        return lichSuCongDanLocalService;
    }

    /**
     * Sets the lich su cong dan local service.
     *
     * @param lichSuCongDanLocalService the lich su cong dan local service
     */
    public void setLichSuCongDanLocalService(
        qldc.pm.qlktcsdldc.service.LichSuCongDanLocalService lichSuCongDanLocalService) {
        this.lichSuCongDanLocalService = lichSuCongDanLocalService;
    }

    /**
     * Returns the lich su cong dan persistence.
     *
     * @return the lich su cong dan persistence
     */
    public LichSuCongDanPersistence getLichSuCongDanPersistence() {
        return lichSuCongDanPersistence;
    }

    /**
     * Sets the lich su cong dan persistence.
     *
     * @param lichSuCongDanPersistence the lich su cong dan persistence
     */
    public void setLichSuCongDanPersistence(
        LichSuCongDanPersistence lichSuCongDanPersistence) {
        this.lichSuCongDanPersistence = lichSuCongDanPersistence;
    }

    /**
     * Returns the lich su cong dan finder.
     *
     * @return the lich su cong dan finder
     */
    public LichSuCongDanFinder getLichSuCongDanFinder() {
        return lichSuCongDanFinder;
    }

    /**
     * Sets the lich su cong dan finder.
     *
     * @param lichSuCongDanFinder the lich su cong dan finder
     */
    public void setLichSuCongDanFinder(LichSuCongDanFinder lichSuCongDanFinder) {
        this.lichSuCongDanFinder = lichSuCongDanFinder;
    }

    /**
     * Returns the nguoi dung local service.
     *
     * @return the nguoi dung local service
     */
    public qldc.pm.qlktcsdldc.service.NguoiDungLocalService getNguoiDungLocalService() {
        return nguoiDungLocalService;
    }

    /**
     * Sets the nguoi dung local service.
     *
     * @param nguoiDungLocalService the nguoi dung local service
     */
    public void setNguoiDungLocalService(
        qldc.pm.qlktcsdldc.service.NguoiDungLocalService nguoiDungLocalService) {
        this.nguoiDungLocalService = nguoiDungLocalService;
    }

    /**
     * Returns the nguoi dung persistence.
     *
     * @return the nguoi dung persistence
     */
    public NguoiDungPersistence getNguoiDungPersistence() {
        return nguoiDungPersistence;
    }

    /**
     * Sets the nguoi dung persistence.
     *
     * @param nguoiDungPersistence the nguoi dung persistence
     */
    public void setNguoiDungPersistence(
        NguoiDungPersistence nguoiDungPersistence) {
        this.nguoiDungPersistence = nguoiDungPersistence;
    }

    /**
     * Returns the nguoi dung finder.
     *
     * @return the nguoi dung finder
     */
    public NguoiDungFinder getNguoiDungFinder() {
        return nguoiDungFinder;
    }

    /**
     * Sets the nguoi dung finder.
     *
     * @param nguoiDungFinder the nguoi dung finder
     */
    public void setNguoiDungFinder(NguoiDungFinder nguoiDungFinder) {
        this.nguoiDungFinder = nguoiDungFinder;
    }

    /**
     * Returns the truong cong dan local service.
     *
     * @return the truong cong dan local service
     */
    public qldc.pm.qlktcsdldc.service.TruongCongDanLocalService getTruongCongDanLocalService() {
        return truongCongDanLocalService;
    }

    /**
     * Sets the truong cong dan local service.
     *
     * @param truongCongDanLocalService the truong cong dan local service
     */
    public void setTruongCongDanLocalService(
        qldc.pm.qlktcsdldc.service.TruongCongDanLocalService truongCongDanLocalService) {
        this.truongCongDanLocalService = truongCongDanLocalService;
    }

    /**
     * Returns the truong cong dan persistence.
     *
     * @return the truong cong dan persistence
     */
    public TruongCongDanPersistence getTruongCongDanPersistence() {
        return truongCongDanPersistence;
    }

    /**
     * Sets the truong cong dan persistence.
     *
     * @param truongCongDanPersistence the truong cong dan persistence
     */
    public void setTruongCongDanPersistence(
        TruongCongDanPersistence truongCongDanPersistence) {
        this.truongCongDanPersistence = truongCongDanPersistence;
    }

    /**
     * Returns the counter local service.
     *
     * @return the counter local service
     */
    public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
        return counterLocalService;
    }

    /**
     * Sets the counter local service.
     *
     * @param counterLocalService the counter local service
     */
    public void setCounterLocalService(
        com.liferay.counter.service.CounterLocalService counterLocalService) {
        this.counterLocalService = counterLocalService;
    }

    /**
     * Returns the resource local service.
     *
     * @return the resource local service
     */
    public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
        return resourceLocalService;
    }

    /**
     * Sets the resource local service.
     *
     * @param resourceLocalService the resource local service
     */
    public void setResourceLocalService(
        com.liferay.portal.service.ResourceLocalService resourceLocalService) {
        this.resourceLocalService = resourceLocalService;
    }

    /**
     * Returns the user local service.
     *
     * @return the user local service
     */
    public com.liferay.portal.service.UserLocalService getUserLocalService() {
        return userLocalService;
    }

    /**
     * Sets the user local service.
     *
     * @param userLocalService the user local service
     */
    public void setUserLocalService(
        com.liferay.portal.service.UserLocalService userLocalService) {
        this.userLocalService = userLocalService;
    }

    /**
     * Returns the user remote service.
     *
     * @return the user remote service
     */
    public com.liferay.portal.service.UserService getUserService() {
        return userService;
    }

    /**
     * Sets the user remote service.
     *
     * @param userService the user remote service
     */
    public void setUserService(
        com.liferay.portal.service.UserService userService) {
        this.userService = userService;
    }

    /**
     * Returns the user persistence.
     *
     * @return the user persistence
     */
    public UserPersistence getUserPersistence() {
        return userPersistence;
    }

    /**
     * Sets the user persistence.
     *
     * @param userPersistence the user persistence
     */
    public void setUserPersistence(UserPersistence userPersistence) {
        this.userPersistence = userPersistence;
    }

    public void afterPropertiesSet() {
        Class<?> clazz = getClass();

        _classLoader = clazz.getClassLoader();

        PersistedModelLocalServiceRegistryUtil.register("qldc.pm.qlktcsdldc.model.LichSuCongDan",
            lichSuCongDanLocalService);
    }

    public void destroy() {
        PersistedModelLocalServiceRegistryUtil.unregister(
            "qldc.pm.qlktcsdldc.model.LichSuCongDan");
    }

    /**
     * Returns the Spring bean ID for this bean.
     *
     * @return the Spring bean ID for this bean
     */
    @Override
    public String getBeanIdentifier() {
        return _beanIdentifier;
    }

    /**
     * Sets the Spring bean ID for this bean.
     *
     * @param beanIdentifier the Spring bean ID for this bean
     */
    @Override
    public void setBeanIdentifier(String beanIdentifier) {
        _beanIdentifier = beanIdentifier;
    }

    @Override
    public Object invokeMethod(String name, String[] parameterTypes,
        Object[] arguments) throws Throwable {
        Thread currentThread = Thread.currentThread();

        ClassLoader contextClassLoader = currentThread.getContextClassLoader();

        if (contextClassLoader != _classLoader) {
            currentThread.setContextClassLoader(_classLoader);
        }

        try {
            return _clpInvoker.invokeMethod(name, parameterTypes, arguments);
        } finally {
            if (contextClassLoader != _classLoader) {
                currentThread.setContextClassLoader(contextClassLoader);
            }
        }
    }

    protected Class<?> getModelClass() {
        return LichSuCongDan.class;
    }

    protected String getModelClassName() {
        return LichSuCongDan.class.getName();
    }

    /**
     * Performs an SQL query.
     *
     * @param sql the sql query
     */
    protected void runSQL(String sql) throws SystemException {
        try {
            DataSource dataSource = lichSuCongDanPersistence.getDataSource();

            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
                    sql, new int[0]);

            sqlUpdate.update();
        } catch (Exception e) {
            throw new SystemException(e);
        }
    }
}
